/**
*  Copyright 2002 Sun Microsystems, Inc. All rights reserved.
*/

/**
 *Title Bank
 * @author xiaofei
 *@version 1.0
 */
package bank;
public class Bank {
	protected double banlance = 0;
	
	public Bank(double money)
	{
		this.banlance += money;
	}
	
	public void withDrawal(double dAmount) throws InsufficientFundsException, NagativeFundsException
	{
		if(this.banlance < dAmount)
		{
			throw new InsufficientFundsException("banlance<dAmount");
		}
		if(dAmount < 0)
		{
			throw new NagativeFundsException("dAmount is nagative");
		}
		this.banlance -= dAmount;
	}
}
